From: Andrew Cooper Date: Mon, 12 Dec 2016 10:05:04 +0000 (+0000) Subject: x86/emul: Annotate more intentional fallthrough cases X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3182 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=f4754c69180c5edeceb24ba7825f8a3767fa5976;p=xen.git x86/emul: Annotate more intentional fallthrough cases Some recent change in x86_emulate.c has simplified the callgraph sufficiently for Coverity to notice these, rather than hitting its upper path limit. All are legitimate fallthoughs. Annotate them as such. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index ddc48dcc71..fe055cff8b 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -2635,8 +2635,8 @@ x86_emulate( ea.mem.off += (src.val >> 3) & ~(op_bytes - 1L); src.val &= (op_bytes << 3) - 1; } - /* Becomes a normal DstMem operation from here on. */ d = (d & ~DstMask) | DstMem; + /* Becomes a normal DstMem operation from here on. */ case DstMem: ea.bytes = (d & ByteOp) ? 1 : op_bytes; dst = ea; @@ -2974,6 +2974,7 @@ x86_emulate( case 0x82: /* Grp1 (x86/32 only) */ generate_exception_if(mode_64bit(), EXC_UD); + /* Fallthrough. */ case 0x80: case 0x81: case 0x83: /* Grp1 */ switch ( modrm_reg & 7 ) { @@ -4288,6 +4289,7 @@ x86_emulate( case 0xfe: /* Grp4 */ generate_exception_if((modrm_reg & 7) >= 2, EXC_UD); + /* Fallthrough. */ case 0xff: /* Grp5 */ switch ( modrm_reg & 7 ) {